package com.hui.blog_server.controller;

import com.hui.blog_server.entity.Languages;
import com.hui.blog_server.entity.ResponseResult;
import com.hui.blog_server.service.impl.LanguagesServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 彩色的小灰
 */
@RestController
public class LanguagesController {

    @Autowired
    LanguagesServiceImpl languagesService;

    @GetMapping("/languages")
    public ResponseResult<List<Languages>> languages() {
        return ResponseResult.success(languagesService.getAllLanguages());
    }

}
